package br.ufrj.ppgi.greco.model.dao;

import java.util.List;

import javax.persistence.EntityManager;

import br.com.caelum.vraptor.ioc.Component;
import br.ufrj.ppgi.greco.model.entity.EntityType;

@Component
public class DAOType extends DAOGeneric<EntityType>
{
	public DAOType(EntityManager em)
	{
		super(em);
	}
	

	public String getAllTypesJson()
	{
		String result = "[";
		List<EntityType> listTypes=  this.getAll();
		for(EntityType type : listTypes)
		{
			result+= "'"+type.getUri()+"',";
		}	
		result += "]";
		return result;
	}

}
